<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<script language="JavaScript">
    function validate_form(){
        if ( document.SiswaForm.kode.value == "" ){
            alert ( "<bean:message key="siswa.kode"/> "+isEmpty );
        }else if ( document.SiswaForm.nama.value == "" ){
            alert ( "<bean:message key="siswa.nama"/> "+isEmpty );
        }else if ( document.SiswaForm.alamat.value == "" ){
            alert ( "<bean:message key="siswa.alamat"/> "+isEmpty );
        }else if ( document.SiswaForm.telp.value == "" ){
            alert ( "<bean:message key="siswa.telp"/> "+isEmpty );
        }else if ( document.SiswaForm.golonganDarah.value == "" ){
            alert ( "<bean:message key="siswa.golonganDarah"/> "+isEmpty );
        }else {
            document.SiswaForm.submit();
        }
    }

    function validate_Card_form(){
        if ( document.SiswaForm.namaCard.value == "" ){
            alert ( "<bean:message key="siswa.nama"/> "+isEmpty);
        }else if ( document.SiswaForm.noCard.value == "" ){
            alert ( "<bean:message key="siswa.kartu"/> "+isEmpty);
        }else{
            document.SiswaForm.submit();
        }
    }

    function validate_Relation_form(){
        if ( document.SiswaForm.namaRelation.value == "" ){
            alert ( "<bean:message key="siswa.nama"/> <bean:message key="siswa.relasi"/> "+isEmpty);
        }else if ( document.SiswaForm.umur.value == "" ){
            alert ( "<bean:message key="siswa.umur"/> "+isEmpty);
        }else if ( document.SiswaForm.relasi.value == "" ){
            alert ( "<bean:message key="siswa.relasi"/> "+isEmpty);
        }else{
            document.SiswaForm.submit();
        }
    }
</script>


